import {getVehicleInfo} from '@/api/user'
const app = getApp();
Page({
  data: {
    vehicleInfo:{}
  },

  onLoad: function() {
    // 可以在这里加载页面数据
  },

  onShow(){
    this.getVehicleInfo()
  },

  async getVehicleInfo(){
    const {driverId} = app.globalData.userInfo || {}
    const res = await getVehicleInfo(driverId)
    console.log(res)
    this.setData({
      vehicleInfo: res[0]
    })
    console.log(this.data.vehicleInfo)
  }
});
